import os
import zipfile
import urllib.request

# 下载文件
url = "http://labfile.oss.aliyuncs.com/courses/780/WeatherData.zip"
filename = "WeatherData.zip"
urllib.request.urlretrieve(url, filename)

# 解压文件到当前工作目录
with zipfile.ZipFile(filename, 'r') as zip_ref:
    extract_path = os.getcwd()
    zip_ref.extractall(extract_path)